package Merlion.FRM.bean;

import Merlion.FRM.entity.InvoiceAndReceiptEntity;
import Merlion.FRM.entity.RefundEntity;
import Merlion.util.state.CustomerJournalState;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import javax.ejb.Remote;

@Remote
public interface PaymentBeanRemote {

    public boolean performPayment(Long creditProfileId, Long invoiceId, Double payment);

    public InvoiceAndReceiptEntity getInvoice(Long invoiceId);

    public Long getSalesOrderId(Long invoiceId);

    public String getCustomerName(Long invoiceId);

    public Collection<Merlion.FRM.entity.InvoiceLineEntryEntity> getLineEntry(Long invoiceId);

    public Double getTotalPrice(Long invoiceId);

    public Double getAmountDue(Long invoiceId);

    public Double getDiscountRate(Long invoiceId);

    public Date getIssueDate(Long invoiceId);

    public Date getInvoiceDueDate(Long invoiceId);

    public int getCreditTerm(Long invoiceId);

    public int getDiscountedCreditTerm(Long invoiceId);

    public Long recordPaymentJournal(Long invoiceId, Double payment);

    public Long createRefund(Long customerId, Long salesOrderId);

    public List<RefundEntity> viewAllRefund();

    public List<CustomerJournalState> viewAllPayment();

    public boolean refundCashInAdvance(Long customerId, Long salesOrderId);

    public Double getFinalAmt(Long invoiceId);

    public Long getCreditProfileId(Long invoiceId);

    public void editJournal(Long customerJournalId, String remarks);

}
